import axios from "../parkAxios"

export const getCarInf=(params)=>{
    return axios({
        url:"/api/parking/checkCar/"+params.carNo,
        method:'get'
    })
}
export const getCarOrder=(params)=>{
    return axios({
        url:"/api/parking/getCarOrder/",
        method:'post',
        params
    })
}

export const getNoCarnoOrder=(params)=>{
    return axios({
        url:"/api/parking/nonecarno/out",
        method:'post',
        params
    })
}

export const noneCarnoIn=(params)=>{
    return axios({
        url:"/api/parking/nonecarno/in",
        method:'post',
        params
    })
}

export const free=(params)=>{
    return axios({
        url:"/api/parking/free",
        method:'post',
        params
    })
}

export const pay=(params)=>{
    return axios({
        url:"/api/parking/pay",
        method:'post',
        params
    })
}

export const cancel=(params)=>{
    return axios({
        url:"/api/parking/cancelOrder",
        method:'post',
        params
    })
}

export const recent=(params)=>{
    return axios({
        url:"/api/parkorder/OrderRecent/"+params.openId,
        method:"get"
    })
}

export const orderDetail=(params)=>{
    return axios({
        url:"/api/parkorder/orderDetail",
        method:'post',
        params
    })
}

export const price=(params)=>{
    return axios({
        url:"/api/parking/getPriceExplain",
        method:"get"
    })
}

export const orderRecord=(params)=>{
    return axios({
        url:"/api/parkorder/orderRecord",
        method:'get',
        params
    })
}

export const getSpace=(params)=>{
    return axios({
        url:"/api/parking/getSpace",
        method:'get'
    })
}

export const bindingList=(params)=>{
    return axios({
        url:"/api/parkcar/list",
        method:'get',
        params
    })
}

export const bindingAdd=(data)=>{
    return axios({
        url:"/api/parkcar/save",
        method:'post',
        data
    })
}

export const bindingDel=(params)=>{
    return axios({
        url:"/api/parkcar/delete",
        method:'post',
        params
    })
}

export const jsApiConfig=(data)=>{
    return axios({
        url:"api/wx/jsApiConfig",
        method:'post',
        data
    })
}

export const dict = (data)=>{
    return axios({
        url:"/api/dict/getDict/"+data.type,
        method:'get',
    })
}